package com.distributeredis.redis_springboot.springbooteasyexcel.read.vo;
 
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
 
/**
 * 类上面的注解，来自lombok和EasyExcel官方，用来自定义表头、宽度等信息
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ColumnWidth(25)
@HeadRowHeight(30)
@ContentRowHeight(20)
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
public class StudentExcelDTO {
 
    @ExcelProperty({"学生综述", "学生编号"})
    private Integer id;
 
    @ExcelProperty({"学生综述", "学生姓名"})
    private String name;
 
    @ExcelProperty({"学生综述", "学生年龄"})
    private Integer age;
 
    @ExcelProperty({"学生综述", "学生爱好"})
    private String hobby;
 
    @ExcelIgnore
    private String address;
}